<?php

namespace common\models\db\tables;

use Yii;

/**
 * This is the model class for table "{{%building_order_messages}}".
 *
 * @property int $id
 * @property int $building_order_id
 * @property int|null $created_by_admin
 * @property int|null $updated_by_admin
 * @property int $created_at
 * @property int $updated_at
 * @property int $deleted_at
 * @property string $message
 * @property int $set_bo_status
 */
class BuildingOrderMessages extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%building_order_messages}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['building_order_id', 'created_by_admin', 'updated_by_admin', 'created_at', 'updated_at', 'deleted_at', 'message', 'set_bo_status'], 'trim'],
            [['building_order_id', 'created_at', 'updated_at', 'message', 'set_bo_status'], 'required'],
            [['building_order_id', 'created_by_admin', 'updated_by_admin', 'created_at', 'updated_at', 'deleted_at', 'set_bo_status'], 'integer'],
            [['message'], 'string'],
            [['created_by_admin', 'updated_by_admin'], 'default', 'value' => null],
            [['deleted_at'], 'default', 'value' => 0],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'building_order_id' => Yii::t('app', 'Building Order ID'),
            'created_by_admin' => Yii::t('app', 'Created By Admin'),
            'updated_by_admin' => Yii::t('app', 'Updated By Admin'),
            'created_at' => Yii::t('app', 'Created At'),
            'updated_at' => Yii::t('app', 'Updated At'),
            'deleted_at' => Yii::t('app', 'Deleted At'),
            'message' => Yii::t('app', 'Message'),
            'set_bo_status' => Yii::t('app', 'Set Bo Status'),
        ];
    }
}
